import { resetRouter, routes } from '@/router'

export default {
  namespaced: true,
  state: {
    menuList: [...routes]
  },
  mutations: {
    setMenuList(state, newList) {
      state.menuList = [...routes, ...newList]
    },
    resetRouter(state) {
      resetRouter()
      state.menuList = [...routes]
    }
  }
}
